﻿<local:DocumentBase x:Class="WPFExcelReport.YCAFS20"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
       Background="White" 
         Loaded="Window_Loaded"
        Title="YCAFS20"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>        
        <StackPanel Margin="0,5,0,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel >
                
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="41" Panel.ZIndex="1"
                        Click="btnQuery_Click"/>
                <Button Content="新建" Height="33" Margin="30,0,0,0"  Name="btnNew" Width="41" Panel.ZIndex="90"
                        Click="btnNew_Click"/>
                <Button Content="修改" Height="33" Margin="10,0,0,0"  Name="btnModify" Width="41" Panel.ZIndex="91"
                        Click="btnModify_Click"/>
                <Button Content="删除" Height="33" Margin="10,0,0,0"  Name="btnDelete" Width="41" Panel.ZIndex="92"
                        Click="btnDelete_Click"/>
                <Button Content="确认保存" Height="33" Margin="10,0,0,0"  Name="btnSave" Width="63" Panel.ZIndex="93"
                        Click="btnSave_Click"/>
            </WrapPanel>
            <WrapPanel>
                <Expander DockPanel.Dock="Top" Name="ex1" Header="明细" ExpandDirection="Up" IsExpanded="False" MaxHeight="100">
                    <WrapPanel Width="1023" Height="30">
                        <Label Content="尺码组："    Width="49" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtSZGRP" Width="56" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="10" Text=""  IsReadOnly="True"
                          Focusable="True" CharacterCasing="Upper" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="26" />
                        <Label Content="尺码："    Width="35" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtSZ" Width="86" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="11"  IsReadOnly="True"
                         Background="YellowGreen" MaxLength="20" FontSize="14" Foreground="#FF141111" Height="26" />
                        <Label Content="尺码描述："    Width="63" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtDESCR" Width="180" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="12"  IsReadOnly="True"
                         Background="Pink" MaxLength="20" FontSize="14" Foreground="#FF141111" Height="26" />
                        <Label Content="伯俊尺码ID："    Width="78" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtINTERFACE" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="13"  IsReadOnly="True"
                         Background="YellowGreen" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="28" />
                    </WrapPanel>
                </Expander>
                <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="1000"
                  Height="426"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible" 
                               ItemsSource="{Binding}" x:Name="MasterDg"  SelectionChanged="MasterDg_SelectionChanged"
                               Grid.ColumnSpan="2" Margin="0,10,0,0" Grid.RowSpan="3" Grid.Row="1">
            <!--MANDANT SZGRP SZ DESCR INTERFACE1 INTEXFACE2-->
                    <fd:FilteringDataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=MANDANT}" Header="客户端" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=SZGRP}" Header="尺码组" Width="SizeToCells" MinWidth="50"  />
                        <DataGridTextColumn Binding="{Binding Path=SZ}" Header="尺码" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=DESCR}" Header="尺码描述" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=INTERFACE1}" Header="伯俊尺码ID" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=INTERFACE2}" Header="接口2" Width="SizeToCells" MinWidth="50" />
                        
                    </fd:FilteringDataGrid.Columns>
                </fd:FilteringDataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
